<template>
    <div>
        <!-- tabs -->
        <button @click="is = 'A1'">A1</button>
        <button @click="is = 'A2'">A2</button>
        <!-- 展示 -->
        <component :is="is"></component>
        <!-- component 要有一个 v-bind:is -->
    </div>
</template>
<script>
import A1 from "./A1"
import A2 from "./A2"
export default {
    data(){
        return{
            is:"A1",//值必须和components对应上
        }
    },
    components:{A1,A2}
}
</script>